<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<title>样式绑定与处理1</title>
		<script src="https://cdn.jsdelivr.net/npm/vue@2.6.14/dist/vue.js"></script>
		<style type="text/css">
			.ball{
				width: 200px;
				height: 200px;
				background-color: hotpink;
			}
			.ballColor{
				border-radius: 50%;
				background-color: green;
			}
		</style>
	</head>
	<body>
		<div id="box">
			<div :class="name"></div>
			<button type="button" @click="chage">变变变</button><br>
			<div :class="ballList"></div>
		</div>
		<script type="text/javascript">
			const vm = new Vue({
				el:'#box',
				data:{
					name:'ball',//单样式
					ballList:['ball','ballColor']//多样式
				},
				methods:{
					chage(){
						this.name = 'ball ballColor';
					}
				}
			})
		</script>
	</body>
</html>
